package at.fhj.itm11.forum.ws;

public class FHJForumAuthWSProxy implements at.fhj.itm11.forum.ws.FHJForumAuthWS_PortType {
	private String _endpoint = null;
	private at.fhj.itm11.forum.ws.FHJForumAuthWS_PortType fHJForumAuthWS_PortType = null;
	private final String ENDPOINTADDRESS = "javax.xml.rpc.service.endpoint.address";

	public FHJForumAuthWSProxy() {
		_initFHJForumAuthWSProxy();
	}

	public FHJForumAuthWSProxy(String endpoint) {
		_endpoint = endpoint;
		_initFHJForumAuthWSProxy();
	}

	private void _initFHJForumAuthWSProxy() {
		try {
			fHJForumAuthWS_PortType = (new at.fhj.itm11.forum.ws.FHJForumAuthWS_ServiceLocator())
					.getFHJForumAuthWSPort();
			if (fHJForumAuthWS_PortType != null) {
				if (_endpoint != null) {
					((javax.xml.rpc.Stub) fHJForumAuthWS_PortType)
							._setProperty(ENDPOINTADDRESS, _endpoint);
				} else {
					_endpoint = (String) ((javax.xml.rpc.Stub) fHJForumAuthWS_PortType)
							._getProperty(ENDPOINTADDRESS);
				}
			}

		} catch (javax.xml.rpc.ServiceException serviceException) {
			serviceException.getStackTrace();
		}
	}

	public String getEndpoint() {
		return _endpoint;
	}

	public void setEndpoint(String endpoint) {
		_endpoint = endpoint;
		if (fHJForumAuthWS_PortType != null){
			((javax.xml.rpc.Stub) fHJForumAuthWS_PortType)._setProperty(
					ENDPOINTADDRESS, _endpoint);
		}
	}

	public at.fhj.itm11.forum.ws.FHJForumAuthWS_PortType getFHJForumAuthWS_PortType() {
		if (fHJForumAuthWS_PortType == null) {
			_initFHJForumAuthWSProxy();
		}
		return fHJForumAuthWS_PortType;
	}

	public boolean authUser(java.lang.String username, java.lang.String password)
			throws java.rmi.RemoteException {
		if (fHJForumAuthWS_PortType == null) {
			_initFHJForumAuthWSProxy();
		}
		return fHJForumAuthWS_PortType.authUser(username, password);
	}

}